<?php

//防止恶意调用
if (!defined('IN_MOD'))
{
    die('Hacking attempt');
}

// 获取平台与店铺基本信息
function getplatshopbaseinfo($shopid=0,$shopinfo=array())
{
	$shopbase = array();
	
	if($shopid > 0)
	{
		if(empty($shopinfo))
		{
			$modulewhere=array();
			$modulewhere["tablename"]="fastxcms_portal_post_supplier";
			$modulewhere["dataid"]=$shopid;
			$modulewhere["dataidname"]="supplier_id";
			$shopinfo=modulepara("datainfo",$modulewhere);
			$parameterinfo = getmoduleparameter($shopinfo['id'], 172);
			if($parameterinfo)
			{
				$shopinfo = hbarray($shopinfo,$parameterinfo);
			}
			$shopinfo['shop_name'] = $shopinfo['post_title'];
		}
		$shopbase['shopid'] = $shopinfo['supplier_id'];
		$shopbase['shop_name'] = $shopinfo['shop_name'];
		$shopbase['shop_url'] = "#shop".$shopinfo['supplier_id'];
	}else{
		$shopbase['shopid'] = 0;
		$shopbase['shop_name'] = "平台自营";
		$shopbase['shop_url'] = "/";
	}
	
	return $shopbase;
}	
?>